home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-02 / fgl110c.zip / 09-08.C < prev    next >
Text File  |  1992-01-31  |  758b  |  40 lines

  1. #include <fastgraf.h>
  2. #include <stdio.h>
  3. #include <stdlib.h>
  4.  
  5. void main(void);
  6.  
  7. char arrow[] = {
  8.    0x00,0x0C,0x00, 0x00,0x0F,0x00, 0xFF,0xFF,0xC0,
  9.    0xFF,0xFF,0xF0, 0xFF,0xFF,0xC0, 0x00,0x0F,0x00,
  10.    0x00,0x0C,0x00
  11.    };
  12.  
  13. void main()
  14. {
  15.    int old_mode;
  16.  
  17.    if (fg_testmode(4,1) == 0) {
  18.       printf("This program requires a 320 ");
  19.       printf("x 200 CGA graphics mode.\n");
  20.       exit(1);
  21.       }
  22.  
  23.    old_mode = fg_getmode();
  24.    fg_setmode(4);
  25.    fg_setclip(0,15,0,199);
  26.  
  27.    fg_move(10,10);
  28.    fg_drwimage(arrow,3,7);
  29.    fg_move(10,20);
  30.    fg_clpimage(arrow,3,7);
  31.    fg_move(8,30);
  32.    fg_revimage(arrow,3,7);
  33.    fg_move(8,40);
  34.    fg_flpimage(arrow,3,7);
  35.    fg_waitkey();
  36.  
  37.    fg_setmode(old_mode);
  38.    fg_reset();
  39. }
  40.